Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid crash when fs is not available #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomohisaota
Copy link

I am trying to generate Excel file in browser using React Typescript.
I am using exceljs library, and it depends on node-graceful-fs
dependency: exceljs#node-unzip-2#fstream#graceful-fs
But loading graceful-fs crashed because fs is not available in Browser.

I do not expect fs nor graceful-fs to run in browser.
I just want to avoid crash in startup sequence.

Check fs.closeSync availability before calling fs.closeSync.toString()
fs is not available in some environments. (such as React Typescript)
But graceful-fs is still useful to run some module. (Such as exceljs)
@elderapo
Copy link

This issue is very annoying. Please merge this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants